﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Libs.HR;

public partial class Pages_Hr_Profile_Report : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AppUtils.CheckLogin();
        Title = Title + " - Thống kê nhân sự thiếu hồ sơ";
        if (!IsPostBack)
        {
            GetDropDownList();
            BindData();
        }
    }

    private void BindData()
    {
        int departmentID = Convert.ToInt32(drpDepartment.SelectedValue);
        var _ProfileLog = new ProfileLog();
        rptList.DataSource = _ProfileLog.GetTListReport(departmentID);
        rptList.DataBind();
    }

    private void GetDropDownList()
    {
        // Department
        var _Department = new Departments();
        drpDepartment.DataSource = _Department.GetTList();
        drpDepartment.DataBind();
        drpDepartment.Items.Insert(0, new ListItem("Chọn phòng ban:", "0"));
    }

    protected void btView_Click(object sender, EventArgs e)
    {
        BindData();
    }
}
